package org.example.myerp.service.serviceimpl;

import java.util.List;

import org.example.myerp.mapper.productDesign.productMaterialCompositionDesign.ProWuliaoDetaileMapper;
import org.example.myerp.pojo.*;
import org.example.myerp.service.ProWuliaoDetaileService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProWuliaoDetaileServiceImpl implements ProWuliaoDetaileService {
	@Autowired
    ProWuliaoDetaileMapper proWuliaoDetaileMapper;

	/**
	 * ��Ӳ�Ʒ���������ϸ������Ϣ
	 */
	@Override
	public int getInsertMaterialCompositionDetails(ProWuliaoDetaile MaterialCompositionDetails) {
		Integer row = proWuliaoDetaileMapper.insertMaterialCompositionDetails(MaterialCompositionDetails);
		return row;
	}

	/**
	 * ����������ɱ�Ų�ѯ���������ϸ
	 */
	@Override
	public List<ProInformation> getSelectDetailsOfMaterialCompositionById(Integer id) {
		List<ProInformation> list = proWuliaoDetaileMapper.selectDetailsOfMaterialCompositionById(id);
		return list;
	}

	/**
	 * �޸����������ϸ�����������Id�޸�������С��
	 */
	@Override
	public Integer getUpdateProWuliaoDetaileRealNumAndCountByProSigeId(Integer id, Integer num, Double count) {
		Integer row = proWuliaoDetaileMapper.updateProWuliaoDetaileRealNumAndCountByProSigeId(id, num, count);
		return row;
	}
}
